import { get, post } from '@/utils/request'

const prefix = 'attach'

export default {
  /**
   * 分类设置
   */
  attachment: data => {
    return get(`${prefix}/attach/index`, data)
  },

  /**
   * 分类设置
   */
  library: data => {
    return get(`${prefix}/library/index`, data)
  },

  /**
   * 相册列表
   */
  albums: data => {
    return get(`${prefix}/album/index`, data)
  },
  /**
   * 相册详情
   */
  albumView: id => {
    return get(`${prefix}/album/view`, {
      id: id
    })
  },
  /**
   * 附件图片
   */
  albumPictures: data => {
    return get(`${prefix}/album/pictures`, data)
  },
  uploadToAlbum: data => {
    return post(`${prefix}/album/upload`, data)
  }
}
